// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   ScrollText.java

package com.kaylyn.item;

import com.kaylyn.util.Initializable;
import com.kaylyn.util.Resource;

import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseWheelEvent;
import java.awt.event.MouseWheelListener;
import javax.swing.*;

public class ScrollText extends JLabel implements Initializable {

	public ScrollText() {
		s1 = "        \u6B64\u65F6\u6B64\u523B\u7684\u6211\uFF0C\u8111\u6D77\u4E2D\u4E0D\u505C\u5730\u6D6E\u73B0\u7740\u4F60\u751C\u7F8E\u7684\u5FAE\u7B11\uFF0C\u4E00\u79D2\u949F\u90FD\u65E0\u6CD5\u505C\u6B62\u60F3\u4F60\uFF0C\u4F60\u65E9\u5DF2\u5360\u636E\u4E86\u6211\u7684\u5FC3\u7075\u3002\u5728\u6211\u4EEC\u76F8\u8BC6\u76F8\u77E5\u76F8\u7231\u7684\u8FD9\u534A\u5E74\u65F6\u95F4\u91CC\uFF0C\u6211\u4E60\u60EF\u4E86\u65F6\u523B\u6709\u4F60\u7684\u966A\u4F34\uFF0C\u53CA\u65F6\u6BB5\u7AD9\u7684\u5206\u79BB\u4E5F\u4F1A\u4F7F\u6211\u60C6\u6005\u4E0D\u5DF2\u3002\u6211\u4E0D\u80FD\u5931\u53BB\u4F60\uFF0C\u6211\u66F4\u8FD8\u554A\u5931\u53BB\u4F60\u7684\u5B64\u72EC\u3002\u4F60\u5C31\u50CF\u662F\u6211\u7684\u4EB2\u4EBA\uFF0C\u4E0D\u8BBA\u662F\u5FEB\u4E50\u8FD8\u662F\u60B2\u4F24\uFF0C\u6211\u7684\u6240\u6709\u90FD\u4E0E\u4F60\u5206\u4EAB\uFF0C\u8FD9\u6837\u7684\u6211\u7684\u8BB0\u5FC6\u4FBF\u662F\u6211\u4EEC\u5171\u540C\u7684\u8BB0\u5FC6\uFF0C\u4E00\u6BB5\u6C38\u8FDC\u65E0\u6CD5\u5FD8\u6000\u7684\u7F8E\u4E3D\u65F6\u5149\u3002";
		s2 = "\n        \u65F6\u95F4\u8FD9\u4E1C\u897F\u5F88\u5947\u602A\uFF0C\u8D8A\u662F\u4E45\u8D8A\u6709\u4EF7\u503C\uFF0C\u8F6C\u773C\u95F4\u6211\u4E0E\u4F60\u76F8\u604B\u5DF2\u6709\u534A\u5E74\u65F6\u95F4\uFF0C\u4E00\u6708\u6709\u4E00\u6708\u6211\u4EEC\u5E78\u798F\u7684\u677F\u7740\u624B\u6307\u8BA1\u7B97\u7740\uFF0C\u5230\u4E86\u4ECA\u5929\uFF0C\u4F18\u52BF\u4E00\u4E2A\u4E0D\u5C0F\u7684\u91CC\u7A0B\u7891\u3002\u65F6\u95F4\u8BF4\u660E\u4E86\u4E00\u5207\uFF0C\u6211\u4EEC\u5BF9\u8FD9\u4EFD\u611F\u60C5\u7684\u6267\u7740\uFF0C\u6211\u4EEC\u7684\u78E8\u5408\u4E0E\u9ED8\u5951\uFF0C\u6211\u4EEC\u5BF9\u672A\u6765\u7684\u5171\u540C\u61A7\u61AC\uFF0C\u90FD\u5DF2\u7ECF\u4E0D\u8A00\u81EA\u660E\u3002\u534A\u5E74\u516D\u4E2A\u6708\u4E00\u767E\u516B\u5341\u591A\u4E2A\u65E5\u65E5\u591C\u591C\uFF0C\u6700\u5F00\u5FC3\u7684\u65F6\u5019\u4FBF\u662F\u4E0E\u4F60\u5728\u4E00\u8D77\uFF0C\u6291\u6216\u662F\u8DDF\u4F60\u50BB\u50BB\u7684\u4E00\u8D77\u56DE\u5FC6\u5728\u4E00\u8D77\u7684\u65F6\u5149\u3002\u800C\u6BCF\u6BCF\u5728\u6DF1\u591C\u91CC\uFF0C\u6211\u4EEC\u5728\u7535\u8BDD\u4E24\u7AEF\u4E92\u8BC9\u8877\u80A0\uFF0C\u96BE\u820D\u96BE\u5206\uFF0C\u5F53\u6211\u4EEC\u5728\u62B1\u60283000\u5206\u949F\u7684\u5FC5\u6709\u8FD8\u4E0D\u591F\u65F6\uFF0C\u5FC3\u91CC\u66F4\u591A\u7684\u662F\u751C\u871C\u3002";
		s3 = "\n        \u5FCD\u4E0D\u4F4F\u8981\u53EB\u4F60\u50BB\u74DC\uFF0C\u50BB\u74DC\uFF0C\u6211\u4EEC\u5728\u4E00\u8D77\u603B\u8981\u505A\u597D\u591A\u597D\u591A\u50BB\u4E8B\uFF0C\u53EF\u662F\u5FC3\u91CC\u5374\u53C8\u8BF4\u4E0D\u5C3D\u7684\u611F\u52A8\uFF0C\u6211\u4F1A\u628A\u8FD9\u4E9B\u611F\u52A8\u6536\u85CF\u5728\u5FC3\u91CC\uFF0C\u6709\u65F6\u4E00\u4E2A\u4EBA\u56DE\u60F3\u72EC\u81EA\u6C89\u6D78\uFF0C\u60F3\u5BF9\u4F60\u8BF4\u58F0\u8C22\u8C22\u3002\u771F\u7684\u8C22\u8C22\u4F60\uFF0C\u50BB\u74DC\u3002\u6211\u7231\u4F60\uFF0C\u8FC7\u53BB\uFF0C\u73B0\u5728\uFF0C\u672A\u6765\uFF0C\u4EE5\u53CA\u6C38\u8FDC\uFF0C\u6211\u8981\u4E00\u76F4\u4E00\u76F4\u8BF4\u4E0B\u53BB\uFF0C\u8BF7\u4F60\u7ED9\u6211\u80FD\u6C38\u8FDC\u8BF4\u8FD9\u53E5\u8BDD\u7684\u673A\u4F1A\u5427\u3002\u4ECA\u540E\u7684\u8DEF\u6211\u4EEC\u4F1A\u8D70\u7684\u66F4\u52A0\u575A\u5B9A\u5427\uFF0C\u534A\u5E74\u4EE5\u6765\u6211\u4EEC\u6210\u719F\u4E86\u5F88\u591A\uFF0C\u66FE\u7ECF\u6709\u8FC7\u7684\u8FDF\u7591\u4ECA\u540E\u4E0D\u4F1A\u518D\u6709\uFF0C\u9762\u5BF9\u56F0\u96BE\u6211\u4EEC\u4E0D\u80FD\u518D\u662F\u9000\u7F29\uFF0C\u8BA9\u6211\u4EEC\u5C31\u8FD9\u6837\u624B\u7275\u624B\u4E00\u8D77\u8D70\u4E0B\u53BB\uFF0C\u8D70\u8FC7\u4ECA\u751F\u4ECA\u4E16\uFF0C\u6765\u751F\u6765\u4E16\u3002";
		setSize(840, 560);
		setIcon(new ImageIcon(Resource.loadImage("4afdf753.jpg")));
		setOpaque(true);
		text = new JTextArea();
		text.setEditable(false);
		text.setLineWrap(true);
		text.setOpaque(false);
		text.setFont(new Font("\u534E\u6587\u65B0\u9B4F", 0, 20));
		text.setForeground(Color.BLACK);
		text.append((new StringBuilder(String.valueOf(s1))).append(s2).append(
				s3).toString());
		scrollPane = new JScrollPane();
		scrollPane.setSize(300, 300);
		scrollPane.setLocation(90, 100);
		scrollPane.setOpaque(false);
		scrollPane.getViewport().setOpaque(false);
		scrollPane.setBorder(BorderFactory.createEmptyBorder());
		scrollPane.setVerticalScrollBarPolicy(21);
		scrollPane.setHorizontalScrollBarPolicy(31);
		text.addMouseWheelListener(new MouseWheelListener() {

			public void mouseWheelMoved(MouseWheelEvent e) {
				Point p = scrollPane.getViewport().getViewPosition();
				if (e.getWheelRotation() == 1
						&& p.y < text.getHeight() - scrollPane.getHeight())
					p.y += 42;
				else if (e.getWheelRotation() == -1 && p.y > 0)
					p.y -= 42;
				scrollPane.getViewport().setViewPosition(p);
				repaint();
			}
		});
		text.addMouseMotionListener(new MouseAdapter(){

			@Override
			public void mouseDragged(MouseEvent e) {
				repaint();
			}
			
		});
		text.addMouseListener(new MouseAdapter(){

			@Override
			public void mouseReleased(MouseEvent e) {
				repaint();
			}

			@Override
			public void mousePressed(MouseEvent e) {
				repaint();
			}
			
		});
		add(scrollPane);
		
	}

	public void start() {
		SwingUtilities.invokeLater(new Runnable() {

			@Override
			public void run() {
				scrollPane.getViewport().setView(text);
			}
		});
	}

	public void stop() {
	}

	private static final long serialVersionUID = 1L;
	private JScrollPane scrollPane;
	private JTextArea text;
	private String s1;
	private String s2;
	private String s3;

}
